//
//  AnchorModel.swift
//  DYZB
//
//  Created by 1 on 16/9/19.
//  Copyright © 2016年 小码哥. All rights reserved.
//

import UIKit

class AnchorModel: NSObject {
    /// 房间ID
    var room_id : String = ""
    /// 房间图片对应的URLString
    var vertical_src : String = ""
    /// 判断是手机直播还是电脑直播
    // 0 : 电脑直播(普通房间) 1 : 手机直播(秀场房间)
    var isVertical : Int = 0
    /// 房间名称
    var room_name : String = ""
    /// 主播昵称
    var nickname : String = ""
    /// 观看人数
    var online : Int = 0
    /// 所在城市
    var anchor_city : String = ""
    
    public func obtainRealValue(dict: [String : Any]) {
        room_id = dict["room_id"] as! String
        vertical_src = dict["vertical_src"] as! String
        isVertical = dict["isVertical"] as! Int
        room_name = dict["room_name"] as! String
        nickname = dict["nickname"] as! String
        online = dict["online"] as! Int
        anchor_city = dict["anchor_city"] as! String
    }
    
//    init(dict : [String : Any]) {
//        super.init()
//        
//        room_id = dict["room_id"] as! Int
//        vertical_src = dict["vertical_src"] as! String
//        room_id = dict["isVertical"] as! Int
//        room_name = dict["room_name"] as! String
//        nickname = dict["nickname"] as! String
//        online = dict["online"] as! Int
//        anchor_city = dict["anchor_city"] as! String
//        
//        //setValuesForKeys(dict)
//    }
//    override func setValue(_ value: Any?, forUndefinedKey key: String) {}
}
